<?php if($server_problem): ?>
    <div class="error">
        <p><b>Ha ocurrido un error guardando sus datos.</b></p>
        <p><b>Por favor intente nuevamente.</b></p>
    </div>
<?php endif; ?>
<?php for ($i = 1; $i <= $section->getPositionCount(); $i++): ?>
    <?php if(isset($elements[$i])): ?>
        <?php include_partial('render'.$elements[$i]->getType()->getType(),
            array(
                strtolower($elements[$i]->getType()->getType()) => $elements[$i],
                'portal' => $portal,
                'hasBigScreen' => $hasBigScreen
            ))?>
    <?php elseif ($i == $form_position):?>
        <?php include_partial('renderForm', ($for_download ? 
                array(
                    'form' => $form, 'for_download' => $for_download, 'content' => $content,
                    'for_user_autenthication' => $for_user_autenthication
                    )
                :
                array('form' => $form, 'for_download' => $for_download)))?>
    <?php endif; ?>
    <?php if($i != $section->getPositionCount()): ?>
        <hr class="separator">
    <?php endif; ?>
<?php endfor;?>